package com.erp.order.purchasing.model;

import com.erp.hr.base.model.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.math.BigDecimal;
import java.util.List;

/**
 * 询价单 实体类
 * @Author: syz
 * @blame syz
 * @CreateTime: 2021/4/6
 */
@Data
@Entity
@DynamicInsert()
@DynamicUpdate()
@EqualsAndHashCode(callSuper = true)
@Table(name="inquiry_list", schema="erp")
public class InquiryList extends BaseModel {

    private static final long serialVersionUID = 1L;

    /**
     * 流程id
     */
    @Column(name = "process_instance_id")
    private String processInstanceId;

    /**
     * 1688id
     */
    @Column(name = "other_id")
    private String otherId;

    /**
     * 编号
     */
    @Column(name = "code")
    private String code;

    /**
     * 标题
     */
    @Column(name = "title")
    private String title;

    /**
     * 采购类型
     */
    @Column(name = "procurement_type")
    private String procurementType;

    /**
     * 询价类型
     */
    @Column(name = "inquiry_type")
    private String inquiryType;

    /**
     * 报价截止日期
     */
    @Column(name = "quotation_closing_ate")
    private String quotationClosingDate;

    /**
     * 开始交货日期
     */
    @Column(name = "begin_date")
    private String beginDate;

    /**
     * 结束交货日期
     */
    @Column(name = "end_date")
    private String endDate;

    /**
     * 交货期
     */
    @Column(name = "day")
    private Integer day;

    /**
     * 报价要求
     */
    @Column(name = "quote_request")
    private String quoteRequest;

    /**
     * 交易方式
     */
    @Column(name = "trading_manner")
    private String tradingManner;

    /**
     * 指定账期结算日
     */
    @Column(name = "designated_settlement_date")
    private String designatedSettlementDate;

    /**
     * 账期结算日
     */
    @Column(name = "settlement_date")
    private String settlementDate;

    /**
     * 阶段支付
     */
    @Column(name = "payment_stage")
    private String paymentStage;

    /**
     * 支付方式
     */
    @Column(name = "payment")
    private String payment;

    /**
     * 发票要求
     */
    @Column(name = "invoice_requirements")
    private String invoiceRequirements;

    /**
     * 证照要求
     */
    @Column(name = "certification_requirements")
    private String certificationRequirements;

    /**
     * 补充说明
     */
    @Column(name = "remark")
    private String remark;

    /**
     * 询价方式
     */
    @Column(name = "book_building")
    private String bookBuilding;

    /**
     * 采购门户
     */
    @Column(name = "procurement_portal")
    private String procurementPortal;

    /**
     * 比价方式
     */
    @Column(name = "price_comparison_way")
    private String priceComparisonWay;

    /**
     * 联系方式
     */
    @Column(name = "contact_way")
    private String contactWay;

    /**
     * 联系人
     */
    @Column(name = "contacts")
    private String contacts;

    /**
     * 联系电话
     */
    @Column(name = "phone")
    private String phone;

    /**
     * 省
     */
    @Column(name = "province")
    private String province;

    /**
     * 市
     */
    @Column(name = "city")
    private String city;

    /**
     * 县
     */
    @Column(name = "county")
    private String county;

    /**
     * 收货地址
     */
    @Column(name = "address")
    private String address;

    /**
     * 总价
     */
    @Column(name = "money")
    private BigDecimal money;

    /**
     * 状态
     */
    @Column(name = "status")
    private String status;

    /**
     * 供应商集合
     */
    @Transient
    private List<InquiryListSupplier> supplierList;

    /**
     * 供应商报价集合
     */
    @Transient
    private List<InquiryListSupplier> quoteList;

    /**
     * 选中供应商数量
     */
    @Transient
    private Integer checkNum;

    /**
     * 报价供应商数量
     */
    @Transient
    private Integer respondNum;

    /**
     * 平均报价
     */
    @Transient
    private BigDecimal averagePrice;

    /**
     * 物资集合
     */
    @Transient
    private List<InquiryListMaterial> materialList;

    @Transient
    private int days;

    @Transient
    private String vendor_id;

}